import 'package:easydouban/generated/json/base/json_field.dart';
import 'package:easydouban/generated/json/i_movie_detail_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class IMovieDetailEntity {

	late List<IMovieDetailData> data;
	late List<IMovieDetailWriter> writer;
	late List<IMovieDetailActor> actor;
	late List<IMovieDetailDirector> director;
	late int createdAt;
	late int updatedAt;
	late String id;
	late String originalName;
	late int imdbVotes;
	late String imdbRating;
	late String rottenRating;
	late int rottenVotes;
	late String year;
	late String imdbId;
	late String alias;
	late String doubanId;
	late String type;
	late String doubanRating;
	late int doubanVotes;
	late int duration;
	late String dateReleased;
  
  IMovieDetailEntity();

  factory IMovieDetailEntity.fromJson(Map<String, dynamic> json) => $IMovieDetailEntityFromJson(json);

  Map<String, dynamic> toJson() => $IMovieDetailEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class IMovieDetailData {

	late int createdAt;
	late int updatedAt;
	late String id;
	late String poster;
	late String name;
	late String genre;
	late String description;
	late String language;
	late String country;
	late String lang;
	late String shareImage;
	late String movie;
  
  IMovieDetailData();

  factory IMovieDetailData.fromJson(Map<String, dynamic> json) => $IMovieDetailDataFromJson(json);

  Map<String, dynamic> toJson() => $IMovieDetailDataToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class IMovieDetailWriter {

	late List<IMovieDetailWriterData> data;
	late int createdAt;
	late int updatedAt;
	late String id;
  
  IMovieDetailWriter();

  factory IMovieDetailWriter.fromJson(Map<String, dynamic> json) => $IMovieDetailWriterFromJson(json);

  Map<String, dynamic> toJson() => $IMovieDetailWriterToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class IMovieDetailWriterData {

	late int createdAt;
	late int updatedAt;
	late String id;
	late String name;
	late String lang;
	late String person;
  
  IMovieDetailWriterData();

  factory IMovieDetailWriterData.fromJson(Map<String, dynamic> json) => $IMovieDetailWriterDataFromJson(json);

  Map<String, dynamic> toJson() => $IMovieDetailWriterDataToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class IMovieDetailActor {

	late List<IMovieDetailActorData> data;
	late int createdAt;
	late int updatedAt;
	late String id;
  
  IMovieDetailActor();

  factory IMovieDetailActor.fromJson(Map<String, dynamic> json) => $IMovieDetailActorFromJson(json);

  Map<String, dynamic> toJson() => $IMovieDetailActorToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class IMovieDetailActorData {

	late int createdAt;
	late int updatedAt;
	late String id;
	late String name;
	late String lang;
	late String person;
  
  IMovieDetailActorData();

  factory IMovieDetailActorData.fromJson(Map<String, dynamic> json) => $IMovieDetailActorDataFromJson(json);

  Map<String, dynamic> toJson() => $IMovieDetailActorDataToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class IMovieDetailDirector {

	late List<IMovieDetailDirectorData> data;
	late int createdAt;
	late int updatedAt;
	late String id;
  
  IMovieDetailDirector();

  factory IMovieDetailDirector.fromJson(Map<String, dynamic> json) => $IMovieDetailDirectorFromJson(json);

  Map<String, dynamic> toJson() => $IMovieDetailDirectorToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class IMovieDetailDirectorData {

	late int createdAt;
	late int updatedAt;
	late String id;
	late String name;
	late String lang;
	late String person;
  
  IMovieDetailDirectorData();

  factory IMovieDetailDirectorData.fromJson(Map<String, dynamic> json) => $IMovieDetailDirectorDataFromJson(json);

  Map<String, dynamic> toJson() => $IMovieDetailDirectorDataToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}